﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class titles : MonoBehaviour {
    float _timer;  //时间
    public Text touchText;  //文本闪耀
	// Use this for initialization
	void Start () {
        _timer = 0;  //开始时时间为0
	}
	
	// Update is called once per frame
	void Update () {
        _timer += Time.deltaTime;
        touchText.enabled = (_timer % 2 < 1) ? true : false;  //文本闪耀
        if (_timer > 20f || Input.GetMouseButtonUp(0))     //大于20秒或者点击左键进入游戏界面
        {
            SceneManager.LoadScene("GamePlay");
        }
	}
}
